﻿@{
    ViewBag.Title = "DownloadReview";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@model AD_Project.Models.File
<script>
    window.onload = function () {
        dzsap_init("#audio_preview", {
            autoplay: "off"
        });
    };
</script>
@{
    DateTime dt = DateTime.Now;

    string time = String.Format("{0:dMyyyy}", dt);
}
<!--Download session-->
<div class="container" id="upload-session" style="margin-top: 50px;">
    <div class="well" style="overflow:hidden;">
        <div class="row" style="margin-bottom: 30px;">
            <div class="span11">
                <div class="img-polaroid box dark simple">
                    <span></span>
                    <audio controls preload="metadata" autobuffer title="anh_nho_em.mp3 (12.8Mb)">
                        <source src="@Url.Content("~/upload/anh-nho-em.mp3")" type="audio/mpeg" />
                        <source src="assets-demos/audio/preview1.ogg" type="audio/ogg" />
                    </audio>
                    <script type="text/javascript">
                        $('.dark.simple audio').panzerlist({ expanded: true });
                    </script>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="span5" style="text-align:center;">
                <div class="alert alert-info"><strong>Tải file miễn phí</strong></div>
                <div>
                    <table class="table table-bordered">
                        <tr>
                            <td>Tên file</td>
                            <td><a href="#">@Model.file_name</a></td>
                        </tr>
                        <tr>
                            <td>Dung lượng</td>
                            <td>15.64MB</td>
                        </tr>
                        <tr>
                            <td>Tốc độ tải</td>
                            <td>~256Kbps</td>
                        </tr>
                    </table>
                    <div id="countdown" class="alert alert-warning">
                        Vui lòng chờ <strong></strong> để download tập tin.                         
                    </div>                    
                </div>
            </div>
            <div class="span5 offset1" style="text-align:center;">
                <div class="alert alert-info"><strong>Tải file tốc độ cao</strong></div>
                <div>
                    <br />
                    <a href="#">
                        <img src="~/img/vip_package_bt.png" /></a>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {        
        setTime(10);
        $("#downloadBtn").click(function () {
            window.location.href = '/File/Download/@Guid.NewGuid().ToString()/@time/@Request.UserHostAddress.ToString()';
        });
    })
</script>


